package edu.llg.cli.example;

import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;
// some exports omitted for the sake of brevity

@Command(name = "ASCIIArt", version = "ASCIIArt springboot-init-meta.json.0", mixinStandardHelpOptions = true)
public class ASCIIArt implements Runnable {
    /**
     * names：指定选项英文名称
     */
    @Option(names = { "-s", "--font-size" }, description = "Font size")
    int fontSize = 19;

    /**
     * paramLabel：参数标签，类似描述信息
     * defaultValue：默认值
     */
    @Parameters(paramLabel = "<word>", defaultValue = "Hello, picocli",
               description = "Words to be translated into ASCII art.")
    private String[] words = { "Hello,", "picocli" };

    @Override
    public void run() {
        System.out.println(fontSize+" ddd "+words);
    }

    public static void main(String[] args) {
        args = new String[]{"-s","12"};
        int exitCode = new CommandLine(new ASCIIArt()).execute(args);
        System.exit(exitCode);
    }
}
